Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
HTML Canvas 2D context "Uncaught DOMException" Firefox

I have a Javascript function:

function drawSheaf(word_sheaf) {
    pageOffset = (parseInt(word_sheaf.page_number, 10) - 1) * PAGE_OFFSET_MULTIPLIER;

    console.log(CTX);
    CTX.beginPath();
    CTX.fillStyle='black';
    CTX.fillText(word_sheaf.word, word_sheaf.x_small/SCALING_FACTOR, word_sheaf.y_big/SCALING_FACTOR + pageOffset);
}

Which is resulting in the following console output:

Page loaded main.js:25:13
CanvasRenderingContext2D { canvas: canvas#canvas, mozCurrentTransform: (6) […], mozCurrentTransformInverse: (6) […], mozTextStyle: "12px Arial", mozImageSmoothingEnabled: true, globalAlpha: 1, globalCompositeOperation: "source-over", strokeStyle: "#000000", fillStyle: "#000000", filter: "none" }
editor.js:93:13
Uncaught DOMException: An exception was thrown editor.js:94
Uncaught DOMException: An exception was thrown editor.js:13
Use of mozImageSmoothingEnabled is deprecated. Please use the unprefixed imageSmoothingEnabled property instead. localhost:8004

Line 94 is CTX.beginPath()

Line 13 is in another function. In that case CTX.rect is the offending call.

How do you debug an error like this? The only hint here is the deprecation warning. But that's (a) a warning not an error and (b) not part of the DOMException. Expanding the DOMException only shows the code path to arrive there. I don't see an exception name or code.

enter image description here

The function runs fine on Chrome and draws the word as expected.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!